import * as constants from '../Constants'
import { get, GET_CHECKSTYLE_LIST } from '../../service/api'


export interface GetCheckStyleList {
  type: constants.GetCheckStyleList
  payload: Promise<any>
}

export interface GetCheckStyleList_PENDING {
  type: constants.GetCheckStyleList_PENDING
  payload: Promise<any>
}

export interface GetCheckStyleList_FULFILLED {
  type: constants.GetCheckStyleList_FULFILLED
  payload: any
}

export interface GetCheckStyleList_PAGE {
  type: constants.GetCheckStyleList_PAGE
  payload: any
}

export type CheckStyleAction = GetCheckStyleList | 
  GetCheckStyleList_FULFILLED | 
  GetCheckStyleList_PENDING | 
  GetCheckStyleList_PAGE


export function getCheckStyleList(param: any): GetCheckStyleList {
  return {
    type: constants.GetCheckStyleList,
    payload: get(GET_CHECKSTYLE_LIST, param)
  }
}
export function page(page: any): GetCheckStyleList_PAGE {
  return {
    type: constants.GetCheckStyleList_PAGE,
    payload: page
  }
}